package com.erdos.message.command;

import java.io.Serializable;


public class InvalidServiceInvocation implements ServiceInvocation {
	private static final long serialVersionUID = 8498898935161083684L;
	private String proxiedServiceClassName=null;
	
	public InvalidServiceInvocation(String proxiedServiceClassName) {
		this.proxiedServiceClassName=proxiedServiceClassName;
	}
	
	/* (non-Javadoc)
	 * @see com.hp.message.command.ServiceInvocation#execute(java.lang.String, java.lang.Object)
	 */
	public Serializable execute(String msgTypeId, Object entity) throws ServiceInvocationException {		
		return null;
	}

	/* (non-Javadoc)
	 * @see com.hp.message.Messaging#getMessageTypeId()
	 */
	public String getMessageTypeId() {
		return null;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((proxiedServiceClassName == null) ? 0
						: proxiedServiceClassName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof InvalidServiceInvocation))
			return false;
		final InvalidServiceInvocation other = (InvalidServiceInvocation) obj;
		if (proxiedServiceClassName == null) {
			if (other.proxiedServiceClassName != null)
				return false;
		} else if (!proxiedServiceClassName
				.equals(other.proxiedServiceClassName))
			return false;
		return true;
	}

	public String toString() {
		return "[" +this.proxiedServiceClassName + "] not valid";
	}
}
